A label is defined by placing a colon at the beginning of a line followed by the label name. The label name must be at least one character up to any length; it can have any character except word delimiters (space, tab, punctuation, etc.). Character case is ignored. The scope of a label is limited to the Clip in which it has been defined; you cannot jump to a label in another Clip. Example of a label:
:Label
The Clip syntax supports predefined label names which have a special meaning. If you define labels with the same name, you will not be able to use the predefined label for the purpose it was defined for. The following labels are predefined:
NEXT
tells the interpreter to execute the next instruction.
SKIP
will skip the next instruction (text and blank lines are counted, but not commented lines).
SKIP_xx (added in v4.52)
will skip xx lines of Clip code (including blank lines, but not commented lines). xx represents a number (positive or negative). For example, Skip_3 will skip the next three lines in the Clip. "Skip" and "Skip_1" have the same effect.
END
ends the execution of the current clip but continues normally in parent Clip (the Clip from which it was executed, if any).
EXIT
ends the execution of the current clip, including any parent Clip.
Labels are useful to skip instructions or repeat them when a certain condition is met. You can use the "^!Goto" command or one of the conditional testing commands to jump to a specific label.
Useful tip when testing Clip code:
You can use the "Ctrl+Alt" key combination to stop the execution of a Clip (especially helpful when stuck in a loop).
Commands:
^!Goto Label
Continues Clip execution from the specified label defined in the Clip.
^!IfLabelExist LabelName GoToLabelTrue [ELSE GoToLabelFalse] (added in v4.52)
Jumps to the specified label if the indicated label name exists in the active Clip.